<?php
session_start();
  if (isset($_SESSION['k_username'])) {
  include('../../conexion.inc.php');
$link = Conectarse();
$editadopor=$_SESSION['k_username'];
$fecha = date("y-m-d h:i:s");
mysql_select_db("gotica_sociosgotica",$link);
$sqllogs="INSERT INTO logs (idsocio , modificadopor, fechamod, tipoed) VALUES ('$_POST[valor]', '$editadopor', '$fecha', \"Borro\")";
$rest=mysql_query($sqllogs);

$sql = "DELETE FROM socios WHERE idsocio='$_POST[valor]' ";
$resulta = mysql_query($sql);
$sql2 = "DELETE FROM socio_tiposocio WHERE idsocio='$_POST[valor]' ";
$resulta2 = mysql_query($sql2);



echo "<SCRIPT LANGUAGE=\"javascript\">";
echo "location.href = \"versocio.php?lim=$_POST[page]\"";
echo "</SCRIPT>";}
else
{
	echo "<SCRIPT LANGUAGE=\"javascript\">";
echo "location.href = \"index.php\"";
echo "</SCRIPT>";
	}
?>